package com.bfxy.springcloud.api;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.bfxy.springcloud.entity.User;


@RestController
public class IndexController {


	@RequestMapping(value = "/getUser",method = RequestMethod.GET)
	public User getUser(@RequestParam("id") int id) throws InterruptedException {
		System.err.println("provider-1   get--->  "+id);
		Thread.sleep(1000);
		return new User(id,"11111get");
	}
	
	
	@RequestMapping(value = "/postUser",method = RequestMethod.POST)
	public User postUser(@RequestParam("id") int id) throws InterruptedException {
		System.err.println("provider-1   post--->  "+id);
		Thread.sleep(1000);
		return new User(id,"11111post");
	}
}
